<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
</head>
<body>
        <div class="btn" onclick="aaa()">
            点击这个
        </div>
</body>
</html>
<script>
        function aaa() {
            console.log('aaa')
            $('.btn').click(function() {
                $(this).addClass('new-class');
            });
        }
</script>
<style>
    .btn{
        width: 100px;
        height: 30px;
        background: red;
    }
    .new-class{
        background: yellow;
    }
</style>
